﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
<head>
<%@ include file="/include/include.jsp"%>
</head>

<body>

<%@ include file="/include/header.jsp"%>

<%@ include file="/include/menu.jsp"%>

<script type="text/javascript">

	var ctx = "<%=request.getContextPath()%>"; 


	function sendMail(id){

		var url = ctx + '/house/housewaring/sendmail/' + id;
		var myAjax = new Ajax.Request(
				url , // 请求的URL
				{
	                method: 'post', // 使用POST方式发送HTTP请求
	                onComplete: showSendMail // 指定请求成功完成时需要执行的方法
	            }
	
	        );


		function showSendMail(request) {
			if(request.responseText == 'true'){
				alert('邮件发送成功');
			}else {
				//alert(errorMsg);
			}
	    }
		
	}

</script>
	
<div id="mainContent">
<h2><a href="${ctx}/${menu.url}">${menu.description}</a>&nbsp;-&nbsp;<a
	href="${ctx}/${empty currViewBarSubMenu_ ? submenu.url : currViewBarSubMenu_.url}">${empty
currViewBarSubMenu_ ? submenu.description :
currViewBarSubMenu_.description}</a></h2>

<div class="tool-bar">
<div
	title="${menu.description} - ${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description} - 查询${empty currViewBarSubMenu_ ? submenu.description : currViewBarSubMenu_.description}"
	href="${ctx}/warehouse/warn/search" class="modal-window modal-link">过滤查询
</div>
 </div>

<div class="grid-list">
<table class="grid" cellspacing="0" url="${ctx}/warehouse/warn/list">
	<thead>
		<tr>
			<td orderBy_="inventorywarningrecord.warehouse.code" class="${orderParameters['inventorywarningrecord.warehouse.code']}">仓储编号</td>
			<td orderBy_="inventorywarningrecord.warehouse.name" class="${orderParameters['inventorywarningrecord.warehouse.name']}">仓储名称</td>
			<td>产品类别</td>
			<td>产品编号</td>
			<td>产品名称</td>
			<td>约定数量</td>
			<td>产品现有数量</td>
			<td orderBy_="inventorywarningrecord.warnDate" class="${orderParameters['inventorywarningrecord.warnDate']}">预警时间</td>
			<td>操作</td>
		</tr>
	</thead>
	<tbody>
					<c:forEach var="inventoryWarningRecord" items="${inventoryWarningRecords}" varStatus="status">
						<tr onmouseover="this.style.backgroundColor= '#A0CFEC'" onmouseout="this.style.backgroundColor= '#ffffff'" >
							<td>${inventoryWarningRecord.warehouse.code}</td>
							<td>${inventoryWarningRecord.warehouse.name }</td>
							<td>${inventoryWarningRecord.product.productCategory.categoryName }</td>
							<td>${inventoryWarningRecord.product.productCode }</td>
							<td>${inventoryWarningRecord.product.productName }</td>
							<td>${inventoryWarningRecord.inventory.agreementAmount}</td>
							<td>${inventoryWarningRecord.currentNumber }</td>
							<td>
								<fmt:formatDate value="${inventoryWarningRecord.warnDate }" pattern="yyyy-MM-dd"/>
								
							</td>
							<td class="tool-bar-tr">
								<a href="javascript:doDelete('您确实要删除该记录吗？删除后将不能恢复,请确认!','${ctx}/warehouse/warn/${inventoryWarningRecord.id}/delete')"  title="删除该条预警信息">
									<img src="${ctx}/static/images/delete.png"  border="0" alt="删除预警信息" />
								</a>
							</td>
						</tr>
					</c:forEach>
					
					
				</tbody>
</table>
<t:page action="${ctx}/warehouse/warn/list" />
</div>
</div>

<%@ include file="/include/script.jsp"%>

</body>

</html>
